package com.example.hospital.service;


import com.example.model.domain.entity.hospital.Schedule;
import com.example.model.vo.hospital.ScheduleOrderVo;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

/**
 * @Author juzipi
 * @Date 2021/5/6 14:24
 * @Info
 */
public interface ScheduleService {


    /**
     * 上传排班
     * @param parameterMap
     * @return
     */
    Boolean insertSchedule(Map<String, Object> parameterMap);

    /**
     * 根据hoscode取Schedule分页
     * @param pageNum
     * @param pageSize
     * @param hoscode
     * @return
     */
    Page<Schedule> getSchedulePage(Integer pageNum, Integer pageSize, String hoscode);

    /**
     * 删除排班
     * @param hoscode
     * @param depcode
     * @return
     */
    Boolean deleteSchedule(String hoscode, String depcode);

    /**
     * 查询排班规则数据
     * @param pageNum
     * @param pageSize
     * @param hoscode
     * @param depcode
     * @return
     */
    Map<String, Object> getScheduleRule(Long pageNum, Long pageSize, String hoscode, String depcode);

    /**
     * 查询排班详细信息
     * @param hoscode
     * @param depcode
     * @param workDate
     * @return
     */
    List<Schedule> getScheduleDetails(String hoscode, String depcode, String workDate);


    /**
     * 获取可预约排班分页
     * @param pageNum
     * @param pageSize
     * @param hoscode
     * @param depcode
     * @return
     */
    Map<String,Object> getBookingScheduleRulePage(Integer pageNum, Integer pageSize, String hoscode, String depcode);

    /**
     * 根据scheduleId查询Schedule
     * @param scheduleId
     * @return
     */
    Schedule getScheduleByScheduleId(String scheduleId);

    /**
     * 根据scheduleId查询 ScheduleOrderVo
     * @param scheduleId
     * @return
     */
    ScheduleOrderVo getScheduleOrderVoById(String scheduleId);

    /**
     * 更新排班
     * @param schedule
     * @return
     */
    Integer updateSchedule(Schedule schedule);
}
